package com.maybach.component.city.constants;

/**
 * Created by bleedfly on 15/1/5.
 */
public enum AreaTypeEnum {

    /**
     * 区
     */
    Area("区域", 1),

    /**
     * 省
     */
    Province("省", 2),

    /**
     * 市
     */
    City("市", 3);

    private String desc;

    private Integer status;

    AreaTypeEnum(String desc, Integer status) {
        this.desc = desc;
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getStatus() {
        return status;
    }

    public static AreaTypeEnum valueOf(Integer value) {
        switch (value) {
            case 1:
                return Area;
            case 2:
                return Province;
            case 3:
                return City;
            default:
                return Area;
        }
    }

    public int value() {
        return this.status;
    }
}
